/************************************************************
** Archivo:		FotoBodaView
** Autor:		
** Fecha:		16/05/2009 19:19:04
** Descripción:	Clase generada automáticamente
** Cliente:		SC
** Proyecto:	eWedding
************************************************************/

using System;
using System.Collections.Generic;
using System.Text;

using Circo.Framework.BusinessLogic;
using Circo.Framework.Persistencia;

using SC.eWedding.Data.Entities;


namespace SC.eWedding.BusinessLogic.Views
{
    public partial class FotoBodaView : AbstractView
    {
    
        #region Private Vars

		private FotoBodaEntity _fotoBoda;

        #endregion

        #region Constructors

		
		public FotoBodaView()
		{
			CrearVista(false);
		}

		public FotoBodaView(bool createRelatedViews)
		{
			CrearVista(createRelatedViews);
		}

		private void CrearVista(bool createRelatedViews)
		{
			this._fotoBoda = new FotoBodaEntity();

			if (createRelatedViews)

			{

				this.Boda = new BodaView(true);

			}

		}

		public FotoBodaView(FotoBodaEntity unaEntidad)
		{
			if (unaEntidad != null)
				this._fotoBoda = unaEntidad;

		}



        #endregion
        
        #region Attributes

		
		public int Id
		{
			get { return this._fotoBoda.Id; }
			set { this._fotoBoda.Id = value; }
		}

		public byte[] Imagen
		{
			get { return this._fotoBoda.Imagen; }
			set { this._fotoBoda.Imagen = value; }
		}

		private BodaView _boda = null;
		public BodaView Boda
		{
			get
			{
				if (this._boda == null)
				{
					if (this._fotoBoda.Boda != null)
						this._boda = new BodaView(this._fotoBoda.Boda);
				}
				return _boda;
			}
			set
			{
				if (value != null)
				{
					this._fotoBoda.Boda = value.MapToEntity();
					this._boda = new BodaView(this._fotoBoda.Boda);
				}
				else
				{
					this._fotoBoda.Boda = null;
					this._boda = null;
				}
			}
		}

		public string Nombre
		{
			get { return this._fotoBoda.Nombre; }
			set { this._fotoBoda.Nombre = value; }
		}


        #endregion

        #region Mapping

		
		public FotoBodaEntity MapToEntity()
		{
			return this._fotoBoda;
		}

		public override Entity MapToBaseEntity()
		{
			return MapToEntity();
		}



        #endregion

        #region CollectionSyncro

		

        #endregion
        
    }
}
